using System.Data;
using System.Data.Common;

namespace Company.BLL.DuLieuChuan
{
    public class LoaiHinhMauDich : BaseClass
    {
        public static DataTable SelectAll()
        {
            string query = "SELECT * FROM t_HaiQuan_LoaiHinhMauDich ORDER BY Ten";
            DbCommand dbCommand = db.GetSqlStringCommand(query);
            return db.ExecuteDataSet(dbCommand).Tables[0];
        }

        public static DataTable SelectBy_Nhom(string nhom)
        {
            string query = string.Format("SELECT * FROM t_HaiQuan_LoaiHinhMauDich WHERE LEFT([ID], 3) = '{0}' ORDER BY Ten", nhom);
            DbCommand dbCommand = db.GetSqlStringCommand(query);
            return db.ExecuteDataSet(dbCommand).Tables[0];
        }
    }
}